<template>
  <div>
    <h1>about</h1>
    <button @click="increment">喜加一</button>
    <div>{{ counter }}</div>
  </div>
</template>
<script>
import { mapState } from "vuex";
import { mapMutations } from "vuex";
export default {
  name: "about",
  components: {
    // HelloWorld
  },
  data: function() {
    return {};
  },
  props: {},
  computed: {
    // 映射store.state
    ...mapState({
      counter: state => state.counter
    })
  },
  methods: {
    // 映射store.mutations
    ...mapMutations({
      increment: "increment"
    })
  }
};
</script>
